package com.yx.changdao.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yx.changdao.common.annotation.AutoFill;
import com.yx.changdao.common.utils.SysUtils;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;


@TableName(SysDict.TABLE_NAME)
@Getter
@Setter
public class SysDict implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据库名
     */
    public static final String TABLE_NAME = "sys_dict";

    /**
     * 主键id
     */
    public static final String ID = "id";
    /**
     * 父id
     */
    public static final String PARENT_ID = "parent_id";
    /**
     * 键
     */
    public static final String DATA_KEY = "data_key";
    /**
     * 值
     */
    public static final String DATA_VALUE = "data_value";
    /**
     *
     */
    public static final String CREATE_TIME = "create_time";
    /**
     *
     */
    public static final String CREATE_BY_NAME = "create_by_name";
    /**
     *
     */
    public static final String CREATE_BY = "create_by";
    /**
     *
     */
    public static final String UPDATE_TIME = "update_time";
    /**
     *
     */
    public static final String UPDATE_BY_NAME = "update_by_name";
    /**
     *
     */
    public static final String UPDATE_BY = "update_by";


    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 父id
     */
    private Integer parentId;
    /**
     * 键
     */
    private String dataKey;
    /**
     * 值
     */
    private String dataValue;
    /**
     * 创建时间
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.INSERT)
    private String createByName;
    /**
     * 创建人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 更新时间
     */
    @AutoFill
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    /**
     * 更新人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.UPDATE)
    private String updateByName;
    /**
     * 更新人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 策略: 问题难度对应的天数说明
     */
    @TableField(exist = false)
    private String desc;
    /**
     * 省市区id
     */
    @TableField(exist = false)
    private String label;
    /**
     * 省市区内容
     */
    @TableField(exist = false)
    private String value;
}
